home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / Localization Tools / Localization using ResEdit™ 3.0 / Plugin for ODF 1 / Plugin for ODF 1.rsrc / VDL_129_Resource.FWvl < prev    next >
Encoding:
Text File  |  1996-12-11  |  23.6 KB  |  853 lines

  1. //========================================================================================
  2. //
  3. // Viewer description for 'FWvl' (ODF view layout) resources
  4. //
  5. // Author:     Steve Crutchfield
  6. //
  7. // Copyright:  (c) 1996 by Apple Computer, Inc., all rights reserved.
  8. //
  9. //========================================================================================
  10.  
  11. //----------------------------------------------------------------------------
  12. // Definitions for useful script and language code pop-up menus.
  13. // (If ResEdit supported an #include mechanism, this could be
  14. // shared among serveral resource types.)
  15. //----------------------------------------------------------------------------
  16.  
  17. DeclareNamedStatement("ScriptCode")
  18.     Margin(0, 2, 0, 0)
  19.         IntegerPopup("Script:", 53, fScriptCode)
  20.             {
  21.                 IntItem("Roman", 0);
  22.                 IntItem("System script", -1);
  23.                 IntItem("Current script", -2);
  24.                 IntItem("Japanese", 1);
  25.                 IntItem("Traditional Chinese", 2);
  26.                 IntItem("Korean", 3);
  27.                 IntItem("Arabic", 4);
  28.                 IntItem("Hebrew", 5);
  29.                 IntItem("Greek", 6);
  30.                 IntItem("Cyrillic", 7);
  31.                 IntItem("Right/Left Symbols", 8);
  32.                 IntItem("Devanagari", 9);
  33.                 IntItem("Gurmukhi", 10);
  34.                 IntItem("Gujarati", 11);
  35.                 IntItem("Oriya", 12);
  36.                 IntItem("Bengali", 13);
  37.                 IntItem("Tamil", 14);
  38.                 IntItem("Telugu", 15);
  39.                 IntItem("Kannada", 16);
  40.                 IntItem("Malayalam", 17);
  41.                 IntItem("Sinhalese", 18);
  42.                 IntItem("Burmese", 19);
  43.                 IntItem("Khmer", 20);
  44.                 IntItem("Thai", 21);
  45.                 IntItem("Laotian", 22);
  46.                 IntItem("Georgian", 23);
  47.                 IntItem("Armenian", 24);
  48.                 IntItem("Simplified Chinese", 25);
  49.                 IntItem("Tibetan", 26);
  50.                 IntItem("Mongolian", 27);
  51.                 IntItem("Geez/Ethiopic", 28);
  52.                 IntItem("East European Roman", 29);
  53.                 IntItem("Vietnamese", 30);
  54.                 IntItem("Extended Arabic", 31);
  55.                 IntItem("Uninterpreted Symbols", 32);
  56.             };
  57.  
  58. DeclareNamedStatement("LanguageCode")
  59.     Margin(0, 2, 0, 2)
  60.         IntegerPopup("Language:", 53, fLanguageCode)
  61.             {
  62.                 IntItem("English", 0);
  63.                 IntItem("French", 1);
  64.                 IntItem("German", 2);
  65.                 IntItem("Italian", 3);
  66.                 IntItem("Dutch", 4);
  67.                 IntItem("Swedish", 5);
  68.                 IntItem("Spanish", 6);
  69.                 IntItem("Danish", 7);
  70.                 IntItem("Portuguese", 8);
  71.                 IntItem("Norwegian", 9);
  72.                 IntItem("Hebrew", 10);
  73.                 IntItem("Japanese", 11);
  74.                 IntItem("Arabic", 12);
  75.                 IntItem("Finnish", 13);
  76.                 IntItem("Greek", 14);
  77.                 IntItem("Icelandic", 15);
  78.                 IntItem("Maltese", 16);
  79.                 IntItem("Turkish", 17);
  80.                 IntItem("Croatian", 18);
  81.                 IntItem("TradChinese", 19);
  82.                 IntItem("Urdu", 20);
  83.                 IntItem("Hindi", 21);
  84.                 IntItem("Thai", 22);
  85.                 IntItem("Korean", 23);
  86.                 IntItem("Lithuanian", 24);
  87.                 IntItem("Polish", 25);
  88.                 IntItem("Hungarian", 26);
  89.                 IntItem("Estonian", 27);
  90.                 IntItem("Lettish", 28);
  91.                 IntItem("Latvian", 28);
  92.                 IntItem("Lapponian", 29);
  93.                 IntItem("Lappish", 29);
  94.                 IntItem("Faeroese", 30);
  95.                 IntItem("Farsi", 31);
  96.                 IntItem("Persian", 31);
  97.                 IntItem("Russian", 32);
  98.                 IntItem("SimpChinese", 33);
  99.                 IntItem("Flemish", 34);
  100.                 IntItem("Irish", 35);
  101.                 IntItem("Albanian", 36);
  102.                 IntItem("Romanian", 37);
  103.                 IntItem("Czech", 38);
  104.                 IntItem("Slovak", 39);
  105.                 IntItem("Slovenian", 40);
  106.                 IntItem("Yiddish", 41);
  107.                 IntItem("Serbian", 42);
  108.                 IntItem("Macedonian", 43);
  109.                 IntItem("Bulgarian", 44);
  110.                 IntItem("Ukrainian", 45);
  111.                 IntItem("Byelorussian", 46);
  112.                 IntItem("Uzbek", 47);
  113.                 IntItem("Kazakh", 48);
  114.                 IntItem("Azerbaijani", 49);
  115.                 IntItem("AzerbaijanAr", 50);
  116.                 IntItem("Armenian", 51);
  117.                 IntItem("Georgian", 52);
  118.                 IntItem("Moldavian", 53);
  119.                 IntItem("Kirghiz", 54);
  120.                 IntItem("Tajiki", 55);
  121.                 IntItem("Turkmen", 56);
  122.                 IntItem("Mongolian", 57);
  123.                 IntItem("MongolianCyr", 58);
  124.                 IntItem("Pashto", 59);
  125.                 IntItem("Kurdish", 60);
  126.                 IntItem("Kashmiri", 61);
  127.                 IntItem("Sindhi", 62);
  128.                 IntItem("Tibetan", 63);
  129.                 IntItem("Nepali", 64);
  130.                 IntItem("Sanskrit", 65);
  131.                 IntItem("Marathi", 66);
  132.                 IntItem("Bengali", 67);
  133.                 IntItem("Assamese", 68);
  134.                 IntItem("Gujarati", 69);
  135.                 IntItem("Punjabi", 70);
  136.                 IntItem("Oriya", 71);
  137.                 IntItem("Malayalam", 72);
  138.                 IntItem("Kannada", 73);
  139.                 IntItem("Tamil", 74);
  140.                 IntItem("Telugu", 75);
  141.                 IntItem("Sinhalese", 76);
  142.                 IntItem("Burmese", 77);
  143.                 IntItem("Khmer", 78);
  144.                 IntItem("Lao", 79);
  145.                 IntItem("Vietnamese", 80);
  146.                 IntItem("Indonesian", 81);
  147.                 IntItem("Tagalog", 82);
  148.                 IntItem("MalayRoman", 83);
  149.                 IntItem("MalayArabic", 84);
  150.                 IntItem("Amharic", 85);
  151.                 IntItem("Tigrinya", 86);
  152.                 IntItem("Galla", 87);
  153.                 IntItem("Oromo", 87);
  154.                 IntItem("Somali", 88);
  155.                 IntItem("Swahili", 89);
  156.                 IntItem("Ruanda", 90);
  157.                 IntItem("Rundi", 91);
  158.                 IntItem("Chewa", 92);
  159.                 IntItem("Malagasy", 93);
  160.                 IntItem("Esperanto", 94);
  161.                 IntItem("Welsh", 128);
  162.                 IntItem("Basque", 129);
  163.                 IntItem("Catalan", 130);
  164.                 IntItem("Latin", 131);
  165.                 IntItem("Quechua", 132);
  166.                 IntItem("Guarani", 133);
  167.                 IntItem("Aymara", 134);
  168.                 IntItem("Tatar", 135);
  169.                 IntItem("Uighur", 136);
  170.                 IntItem("Dzongkha", 137);
  171.                 IntItem("JavaneseRom", 138);
  172.                 IntItem("SundaneseRom", 139);
  173.                 IntItem("Unspecified", 32767);
  174.             };
  175.  
  176. //----------------------------------------------------------------------------
  177. // Statement representing a list of subviews, as used in the FrameLayout
  178. // and SuperView definitions.  Ideally the list of accepted class labels
  179. // in the "case" statements wouldn't be needed; it's required as a
  180. // workaround because "SELF" commands can only appear in Switch 
  181. // statements in VDL code, but ResEdit doesn't permit a "SELF" to appear
  182. // in the default clause of a Switch.
  183. //
  184. // If you add your own custom type, you must add a "case" statement
  185. // for it here.
  186. //----------------------------------------------------------------------------
  187.  
  188. DeclareNamedStatement("ViewList")
  189.     Margin(5, 5, 5, 5)
  190.         DynamicListMargin("Views:", fViews, Width = UseParent)
  191.             DynamicVList(fViews, View, Width = UseParent)
  192.                 Switch(fLabel)
  193.                 {
  194.                     case 'view':
  195.                     case 'suvw':
  196.                     case 'cont':
  197.                     case 'ncnt':
  198.                     case 'butn':
  199.                     case 'popm':
  200.                     case 'scbr':
  201.                     case 'grbx':
  202.                     case 'lbox':
  203.                     case 'stxt':
  204.                     case 'gpbx':
  205.                     case 'edvw':
  206.                     case 'picv':
  207.                     case 'Pwdv':
  208.                     case 'Sedv':
  209.                     case 'Frmv':
  210.                     case 'rulr':
  211.                     case 'drvw':
  212.                     case 'ctvw':
  213.                         SELF
  214.                     
  215.                     default:
  216.                         HList()
  217.                         {
  218.                             StaticText("### unknown view class label: ");
  219.                             StaticText(fLabel);
  220.                         }
  221.                 }
  222.  
  223. //----------------------------------------------------------------------------
  224. // "Font" and "String" are utility statements used by the many view
  225. // classes that include FW_RFont and FW_RStringData resource
  226. // information.  The use of DynamicVList in both definitions is
  227. // a workaround; see the comments in the EDL code for details.
  228. //----------------------------------------------------------------------------
  229.  
  230. DeclareNamedStatement("Font")
  231.     Label("Font", Single, Width = UseParent)
  232.         Margin(5, 0, 5, 5)
  233.             VList(Width = UseParent)
  234.             {
  235.                 HList()
  236.                 {
  237.                     EditText(fFontSize, Fixed(16, 16), Label = "Font size:", Width = 100, LabelWidth = 50, LabelAlignment = Right);
  238.                     EditText(fFontStyle, Label = "Style:", Width = 100, LabelWidth = 50, LabelAlignment = Right);
  239.                 }
  240.                 
  241.                 DynamicVList(fFontName, String, Width = UseParent)
  242.                     VList(Width = UseParent)
  243.                     {
  244.                         IncludeNamedStatement("ScriptCode");
  245.                         IncludeNamedStatement("LanguageCode");
  246.                         EditText(fFontName, Label = "Font name:", LabelWidth = 50, LabelAlignment = Right, Width = 150);
  247.                     }
  248.             }
  249.  
  250. DeclareNamedStatement("String")
  251.     Label("String", Single, Width = UseParent)
  252.         Margin(5, 0, 5, 5)
  253.             DynamicVList(fString, String, Width = UseParent)
  254.                 VList(Width = UseParent)
  255.                 {
  256.                     IncludeNamedStatement("ScriptCode");
  257.                     IncludeNamedStatement("LanguageCode");
  258.                     EditText(fString, Label = "String:", LabelWidth = 50, LabelAlignment = Right);
  259.                 }
  260.  
  261. DeclareNamedStatement("Color")
  262.     Label("Erase Color", Single, Width = UseParent)
  263.         Margin(5, 5, 5, 5)
  264.             VList(Width = UseParent)
  265.             {
  266.                 EditText(fRed, Label = "Red:", LabelWidth = 50, LabelAlignment = Right, Width = 150);
  267.                 Spacer(Height = 5);
  268.                 
  269.                 EditText(fGreen, Label = "Green:", LabelWidth = 50, LabelAlignment = Right, Width = 150);
  270.                 Spacer(Height = 5);
  271.                 
  272.                 EditText(fBlue, Label = "Blue:", LabelWidth = 50, LabelAlignment = Right, Width = 150);
  273.                 Spacer(Height = 5);                
  274.             }
  275.  
  276. //----------------------------------------------------------------------------
  277. // FW_RRadioCluster is defined in FWViews.fr; it's included here for
  278. // completeness and to allow editing of the custom view type defined
  279. // by the sample Form part.
  280. //----------------------------------------------------------------------------
  281.  
  282. DeclareNamedStatement("RadioCluster")
  283.     Label("Radio Cluster", Single)
  284.         Margin(5, 5, 5, 5)
  285.             VList(Width = UseParent)
  286.             {
  287.                 HList()
  288.                 {
  289.                     StaticText("Class tag: ", Width = 50, Alignment = Right);
  290.                     StaticText(fClassTag, Width = 40);
  291.         
  292.                     StaticText("Object Tag: ", Width = 60, Alignment = Right);
  293.                     StaticText(fObjectTag, Width = 40);
  294.         
  295.                     StaticText("ViewClass: ", Width = 100, Alignment = Right);
  296.                     StaticText(fViewClass, Width = 50);
  297.                 }
  298.                 
  299.                 HList()
  300.                 {
  301.                     StaticText("Class ID: ", Width = 50, Alignment = Right);
  302.                     StaticText(fClassID, Width = 40);
  303.         
  304.                     StaticText("Object ID: ", Width = 60, Alignment = Right);
  305.                     StaticText(fObjectID, Width = 40);
  306.         
  307.                     StaticText("ViewID: ", Width = 100, Alignment = Right);
  308.                     StaticText(fViewID, Width = 50);
  309.                 }        
  310.                 
  311.                 Spacer(Height = 5);
  312.                 
  313.                 DynamicListMargin("Radio Array:", fRadioArray, Width = 200)
  314.                     DynamicVList(fRadioArray, RadioEntry, Width = UseParent)
  315.                         Margin(2, 2, 2, 2)
  316.                             HList()
  317.                             {
  318.                                 StaticText("RadioID #");
  319.                                 StaticText(ContextElementIndex);
  320.                                 
  321.                                 Spacer(Width = 5);
  322.                                 
  323.                                 EditText(fRadioID, Width = 70);            
  324.                             }
  325.             }
  326.  
  327. //----------------------------------------------------------------------------
  328. // The definitions for "Scroller" and "ScrollBarScroller" are used by
  329. // the FrameLayout class, defined below.
  330. //----------------------------------------------------------------------------
  331.  
  332. DeclareNamedStatement("Scroller")
  333.     VList(Width = UseParent)
  334.     {
  335.         HList()
  336.         {
  337.             StaticText("Class tag: ", Width = 50, Alignment = Right);
  338.             StaticText(fClassTag, Width = 50);
  339.  
  340.             StaticText("ObjectTag: ", Width = 60, Alignment = Right);
  341.             StaticText(fObjectTag, Width = 50);
  342.  
  343.             StaticText("EnclFrameClass: ", Width = 100, Alignment = Right);
  344.  
  345.             Switch(fEnclosureFrameClass)
  346.             {
  347.                 case -2:
  348.                     StaticText("FW_kPrivNULLObjectID");
  349.                 
  350.                 default:
  351.                     StaticText(fEnclosureFrameClass, Width = 50);
  352.             }
  353.         }
  354.         
  355.         HList()
  356.         {
  357.             StaticText("Class ID: ", Width = 50, Alignment = Right);
  358.             StaticText(fClassID, Width = 50);
  359.  
  360.             StaticText("Object ID: ", Width = 60, Alignment = Right);
  361.             StaticText(fObjectID, Width = 50);
  362.  
  363.             StaticText("EnclFrameID: ", Width = 100, Alignment = Right);
  364.             
  365.             Switch(fEnclosureFrameID)
  366.             {
  367.                 case -301:
  368.                     StaticText("FW_kPreregisteredRootViewObject");
  369.                 
  370.                 case -303:
  371.                     StaticText("FW_kPreregisteredFrameObject");
  372.                     
  373.                 default:
  374.                     StaticText(fEnclosureFrameID, Width = 50);
  375.             }
  376.         }        
  377.  
  378.         Spacer(Height = 2);
  379.         
  380.         IntegerPopup("Label:", 53, fLabel)
  381.         {
  382.             IntItem("FW_RScroller", 'sclr');
  383.             IntItem("FW_RScrollBarScroller", 'sbsc');
  384.         };
  385.  
  386.         Spacer(Height = 2);
  387.         
  388.         EditText(fAutoScrollInset, Fixed(16, 16), Label = "Auto Scroll Inset:", Width = 170, LabelWidth = 100, LabelAlignment = Right);        
  389.  
  390.         Spacer(Height = 2);
  391.  
  392.         HList()
  393.         {
  394.             EditText(fScrollUnitX, Fixed(16, 16), Label = "Scroll Unit X:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  395.             Spacer(Width = 10);
  396.             EditText(fScrollUnitY, Fixed(16, 16), Label = "Y:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  397.         }
  398.         
  399.         
  400.         // Un-comment the next line if you're editing an
  401.         // ODF 2 part.
  402.  
  403.         //CheckBox("PageNavigationKeys", fPageNavigationKeys);
  404.     }
  405.  
  406. DeclareNamedStatement("ScrollBarScroller")
  407.     VList(Width = UseParent)
  408.     {
  409.         IncludeNamedStatement("Scroller");
  410.         Spacer(Height = 2);
  411.         
  412.         // Un-comment the next line if you're editing an
  413.         // ODF 2 part.
  414.  
  415.         //CheckBox("LiveScrolling", fLiveScrolling);
  416.         
  417.         HList()
  418.         {
  419.             EditText(fHorizViewID, Label = "HViewID:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  420.             Spacer(Width = 10);
  421.             EditText(fVertViewID, Label = "VViewID:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  422.         }
  423.     }
  424.  
  425. //----------------------------------------------------------------------------
  426. // The following statement definitions contain VDL code corresponding 
  427. // directly to the appropriate view type.
  428. //----------------------------------------------------------------------------
  429.  
  430. DeclareNamedStatement("View")
  431.     VList(Width = UseParent)
  432.     {
  433.         HList()
  434.         {
  435.             StaticText("Class tag: ", Width = 50, Alignment = Right);
  436.             StaticText(fClassTag, Width = 40);
  437.  
  438.             StaticText("Object Tag: ", Width = 60, Alignment = Right);
  439.             StaticText(fObjectTag, Width = 40);
  440.  
  441.             StaticText("ParentViewClass: ", Width = 100, Alignment = Right);
  442.  
  443.             Switch(fParentViewClass)
  444.             {
  445.                 case -2:
  446.                     StaticText("FW_kPrivNULLObjectID");
  447.                 
  448.                 default:
  449.                     StaticText(fParentViewClass, Width = 50);
  450.             }
  451.         }
  452.         
  453.         HList()
  454.         {
  455.             StaticText("Class ID: ", Width = 50, Alignment = Right);
  456.             StaticText(fClassID, Width = 40);
  457.  
  458.             StaticText("Object ID: ", Width = 60, Alignment = Right);
  459.             StaticText(fObjectID, Width = 40);
  460.  
  461.             StaticText("ParentViewID: ", Width = 100, Alignment = Right);
  462.  
  463.             Switch(fParentViewID)
  464.             {
  465.                 case -301:
  466.                     StaticText("FW_kPreregisteredRootViewObject");
  467.                 
  468.                 case -303:
  469.                     StaticText("FW_kPreregisteredFrameObject");
  470.                     
  471.                 default:
  472.                     StaticText(fParentViewID, Width = 50);
  473.             }
  474.         }        
  475.  
  476.         Spacer(Height = 2);
  477.         
  478.         IntegerPopup("Label:", 53, fLabel)
  479.         {
  480.             IntItem("FW_RView", 'view');
  481.             IntItem("FW_RSuperView", 'suvw');
  482.             IntItem("FW_RControl", 'cont');
  483.             IntItem("FW_RNativeControl", 'ncnt');
  484.             IntItem("FW_RButton", 'butn');
  485.             IntItem("FW_RPopUpMenu", 'popm');
  486.             IntItem("FW_RScrollBar", 'scbr');
  487.             IntItem("FW_RGrowBox", 'grbx');
  488.             IntItem("FW_RListBox", 'lbox');
  489.             IntItem("FW_RStaticText", 'stxt');
  490.             IntItem("FW_RGroupBox", 'gpbx');
  491.             IntItem("FW_REditView", 'edvw');
  492.             IntItem("FW_RPictSView", 'picv');
  493.             
  494.             IntItem("PasswordView", 'Pwdv');
  495.             IntItem("ScrollingEditView", 'Sedv');
  496.             IntItem("Ruler", 'rulr');
  497.             IntItem("DrawView", 'drvw');
  498.             IntItem("ContainerView", 'ctvw');
  499.         };
  500.  
  501.         Label("Bounds:", Single)
  502.             Margin(0, 2, 5, 5)
  503.                 VList(Width = UseParent)
  504.                 {
  505.                     HList()
  506.                     {
  507.                         EditText(fLeft, Fixed(16, 16), Label = "Left:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  508.                         Spacer(Width = 10);
  509.                         EditText(fTop, Fixed(16, 16), Label = "Top:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  510.                     }
  511.                     
  512.                     Spacer(Height = 2);
  513.                     
  514.                     HList()
  515.                     {
  516.                         EditText(fRight, Fixed(16, 16), Label = "Right:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  517.                         Spacer(Width = 10);
  518.                         EditText(fBottom, Fixed(16, 16), Label = "Bottom:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  519.                     }
  520.                 }
  521.         
  522.         Spacer(Height = 5);
  523.         
  524.         IntegerPopup("Binding:", 53, fBinding)
  525.         {
  526.             IntItem("FW_kNoBinding", 0x00000000);
  527.             IntItem("FW_kLeftBinding", 0x00000001);
  528.             IntItem("FW_kRightBinding", 0x00000002);
  529.             IntItem("FW_kTopBinding", 0x00000004);
  530.             IntItem("FW_kBottomBinding", 0x00000008);
  531.             IntItem("FW_kFixedWidth", 0x00000010);
  532.             IntItem("FW_kFixedHeight", 0x00000020);
  533.             IntItem("FW_kFixedLocation", 0x00000005);
  534.             IntItem("FW_kFixedSize", 0x00000030);
  535.             IntItem("FW_kFixedBounds", 0x00000035);
  536.             IntItem("FW_kFitToEnclosure", 0x0000000F);
  537.             IntItem("FW_kVScrollBarBinding", 0x0000001E);
  538.             IntItem("FW_kHScrollBarBinding", 0x0000002B);
  539.             IntItem("FW_kGrowBoxBinding", 0x0000003A);
  540.         };
  541.         
  542.         Spacer(Height = 2);
  543. }
  544.  
  545. DeclareNamedStatement("Control")
  546.     VList(Width = UseParent)
  547.     {
  548.         IncludeNamedStatement("View");
  549.         
  550.         EditText(fMessage, Label = "Message:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  551.  
  552.         Margin(0, 2, 0, 2)
  553.             IntegerPopup("Receiver:", 53, fReceiver)
  554.             {
  555.                 IntItem("FW_kNoReceiver", 0);
  556.                 IntItem("FW_kViewReceiver", 1);
  557.                 IntItem("FW_kFrameReceiver", 2);
  558.             };
  559.  
  560.         EditText(fInitialValue, Label = "Initial:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  561.         Spacer(Height = 2);
  562.     }        
  563.  
  564. DeclareNamedStatement("Button")
  565.     VList(Width = UseParent)
  566.     {
  567.         IncludeNamedStatement("Control");
  568.         
  569.         Margin(0, 0, 0, 2)
  570.             IntegerPopup("Kind:", 53, fButtonKind)
  571.             {
  572.                 IntItem("FW_kPushButton", 0);
  573.                 IntItem("FW_kRadioButton", 1);
  574.                 IntItem("FW_kCheckBox", 2);
  575.                 IntItem("FW_kDefaultPushButton", 3);
  576.             };
  577.  
  578.         IncludeNamedStatement("Font");
  579.         IncludeNamedStatement("String");
  580.     }
  581.  
  582. DeclareNamedStatement("PopUpMenu")
  583.     VList(Width = UseParent)
  584.     {
  585.         IncludeNamedStatement("Control");
  586.         Spacer(Height = 2);
  587.         
  588.         EditText(fMacMenuID, Label = "MacMenuID:", LabelWidth = 80, LabelAlignment = Right, Width = 150);
  589.         Spacer(Height = 2);
  590.         
  591.         EditText(fTitleWidth, Label = "TitleWidth:", LabelWidth = 80, LabelAlignment = Right, Width = 150);
  592.         Spacer(Height = 2);
  593.         
  594.         EditText(fInitialMenuItem, Label = "InitialMenuItem:", LabelWidth = 80, LabelAlignment = Right, Width = 150);
  595.         Spacer(Height = 2);
  596.         
  597.         EditText(fMenuVariation, Label = "MenuVariation:", LabelWidth = 80, LabelAlignment = Right, Width = 150);
  598.         Spacer(Height = 2);
  599.         
  600.         EditText(fMenuRefCon, Label = "MenuRefCon:", LabelWidth = 80, LabelAlignment = Right, Width = 150);
  601.         Spacer(Height = 2);
  602.                 
  603.         IncludeNamedStatement("Font");
  604.         IncludeNamedStatement("String");
  605.     }
  606.  
  607. DeclareNamedStatement("ScrollBar")
  608.     VList(Width = UseParent)
  609.     {
  610.         IncludeNamedStatement("Control");
  611.         
  612.         HList()
  613.         {
  614.             EditText(fMinValue, Label = "MinValue:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  615.             Spacer(Width = 10);
  616.             EditText(fMaxValue, Label = "MaxValue:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  617.         }
  618.     
  619.         Spacer(Height = 2);
  620.  
  621.         HList()
  622.         {
  623.             EditText(fMajorUnits, Fixed(16, 16), Label = "MajUnit:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  624.             Spacer(Width = 10);
  625.             EditText(fMinorUnits, Fixed(16, 16), Label = "MinUnit:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  626.         }
  627.     }
  628.  
  629. DeclareNamedStatement("ListBox")
  630.     VList(Width = UseParent)
  631.     {
  632.         IncludeNamedStatement("View");
  633.         
  634.         EditText(fNumRows, Label = "NumRows:", Width = 150, LabelWidth = 80, LabelAlignment = Right);
  635.         
  636.         CheckBox("VerticalSB", fVerticalSB);
  637.         CheckBox("SingleSelection", fSingleSelection);
  638.         CheckBox("UseFocusFrame", fUseFocusFrame);
  639.         CheckBox("UseClientData", fUseClientData);
  640.         
  641.         EditText(fDblClickMessage, Label = "DblClickMessage:", Width = 150, LabelWidth = 80, LabelAlignment = Right);
  642.  
  643.         IncludeNamedStatement("Font");
  644.         
  645.         DynamicVList(fStrings, String, Width = UseParent)
  646.             IncludeNamedStatement("String");
  647.     }
  648.  
  649. DeclareNamedStatement("StaticText")
  650.     VList(Width = UseParent)
  651.     {
  652.         IncludeNamedStatement("View");
  653.         IncludeNamedStatement("Font");
  654.         
  655.         // Un-comment the next line if you're editing an ODF 2 part.
  656.         // IncludeNamedStatement("Color");
  657.         
  658.         IncludeNamedStatement("String");
  659.     }
  660.  
  661. DeclareNamedStatement("EditView")
  662.     VList(Width = UseParent)
  663.     {
  664.         IncludeNamedStatement("View");
  665.         
  666.         EditText(fMaxChars, Label = "MaxChars:", Width = 150, LabelWidth = 50, LabelAlignment = Right);
  667.         Spacer(Height = 2);
  668.         
  669.         EditText(fAttributes, Label = "Attribs:", Width = 150, LabelWidth = 50, LabelAlignment = Right);
  670.         Spacer(Height = 2);
  671.  
  672.         IncludeNamedStatement("Font");
  673.         IncludeNamedStatement("String");
  674.     }
  675.  
  676. DeclareNamedStatement("SuperView")
  677.     VList(Width = UseParent)
  678.     {
  679.         IncludeNamedStatement("View");
  680.         
  681.         HList()
  682.         {
  683.             EditText(fExtentX, Fixed(16, 16), Label = "Extent X:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  684.             Spacer(Width = 10);
  685.             EditText(fExtentY, Fixed(16, 16), Label = "Extent Y:", Width = 120, LabelWidth = 50, LabelAlignment = Right);
  686.         }
  687.  
  688.         CheckBox("IsContentView", fIsContentView);
  689.         
  690.         Spacer(Height = 2);
  691.         
  692.         IntegerPopup("Direction:", 53, fScrollingDirection)
  693.         {
  694.             IntItem("FW_kNoScrolling", 0x00000000);
  695.             IntItem("FW_kXScrolling", 0x00000001);
  696.             IntItem("FW_kYScrolling", 0x00000010);
  697.             IntItem("FW_kXYScrolling", 0x00000011);
  698.         };
  699.  
  700.         Spacer(Height = 2);
  701.         
  702.         IncludeNamedStatement("ViewList");
  703.     }
  704.  
  705. DeclareNamedStatement("PicView")
  706.     VList(Width = UseParent)
  707.     {
  708.         IncludeNamedStatement("SuperView");
  709.         
  710.         EditText(fPictureID, Label = "PictureID:", Width = 150, LabelWidth = 50, LabelAlignment = Right);        
  711.     }
  712.  
  713. DeclareNamedStatement("FormView")
  714.     VList(Width = UseParent)
  715.     {
  716.         IncludeNamedStatement("PicView");
  717.         
  718.         Spacer(Height = 2);
  719.         EditText(fPictureID, Label = "Picture2:", Width = 150, LabelWidth = 50, LabelAlignment = Right);        
  720.         
  721.         DynamicVList(fRadioClusters, RadioCluster, Width = UseParent)
  722.             IncludeNamedStatement("RadioCluster");
  723.     }
  724.  
  725. DeclareNamedStatement("ScrollingEditView")
  726.     VList(Width = UseParent)
  727.     {
  728.         IncludeNamedStatement("EditView");
  729.         
  730.         Spacer(Height = 5);
  731.         
  732.         HList()
  733.         {
  734.             EditText(fVertViewID, Label = "HorizViewID:", Width = 130, LabelWidth = 70, LabelAlignment = Right);
  735.             Spacer(Width = 10);
  736.             EditText(fHorizViewID, Label = "VertViewID:", Width = 130, LabelWidth = 70, LabelAlignment = Right);
  737.         }
  738.  
  739.         Spacer(Height = 2);
  740.         
  741.         EditText(fTextWidth, Fixed(16, 16), Label = "TextWidth:", Width = 160, LabelWidth = 70, LabelAlignment = Right);        
  742.     }
  743.     
  744. DeclareNamedStatement("FrameLayout")
  745.     Margin(5, 5, 5, 5)
  746.         VList(Width = UseParent)
  747.         {
  748.             Margin(5, 5, 5, 5)
  749.                 VList(Width = UseParent)
  750.                 {
  751.                     StaticText("Layout size:");
  752.                     Spacer(Height = 2);
  753.                     
  754.                     EditText(fLayoutSizeX, Fixed(16, 16), Label = "X:", Width = 100, LabelWidth = 20, LabelAlignment = Right);
  755.                     Spacer(Height = 2);
  756.     
  757.                     EditText(fLayoutSizeY, Fixed(16, 16), Label = "Y:", Width = 100, LabelWidth = 20, LabelAlignment = Right);
  758.                 }
  759.             
  760.             IncludeNamedStatement("ViewList");
  761.     
  762.             Spacer(Height = 10);
  763.             
  764.             DynamicListMargin("Scrollers:", fScrollers, Width = UseParent)
  765.                 DynamicVList(fScrollers, Scroller, Width = UseParent)
  766.                     Switch(fLabel)
  767.                     {
  768.                         case 'sclr':
  769.                             IncludeNamedStatement("Scroller");
  770.                             
  771.                         case 'sbsc':
  772.                             IncludeNamedStatement("ScrollBarScroller");
  773.                         
  774.                         default:
  775.                             HList()
  776.                             {
  777.                                 StaticText("### unknown scroller class label: ");
  778.                                 StaticText(fLabel);
  779.                             }
  780.                     }
  781.         }
  782.  
  783. //----------------------------------------------------------------------------
  784. // Main statement.  The Switch calls the appropriate named statement
  785. // for each class label encountered.
  786. //
  787. // If you want to add support for your own custom view types and
  788. // your types add additional fields to the standard ones, you
  789. // can define a new named statement that includes the standard
  790. // statement for the class from which you derive, and add a "case"
  791. // calling that statement below.  If you don't add any custom fields,
  792. // just add another "case" label below the one for the class
  793. // you're extending.
  794. //----------------------------------------------------------------------------
  795.  
  796. Margin(2, 2, 2, 2)
  797.     Margin(5, 5, 5, 5, Single)
  798.         Switch(fLabel)
  799.         {
  800.             case 'root':
  801.                 IncludeNamedStatement("FrameLayout");
  802.                     
  803.             case 'view':
  804.             case 'grbx':
  805.                 IncludeNamedStatement("View");
  806.             
  807.             case 'suvw':
  808.             case 'rulr':
  809.             case 'drvw':
  810.             case 'ctvw':
  811.                 IncludeNamedStatement("SuperView");
  812.             
  813.             case 'cont':
  814.             case 'ncnt':
  815.                 IncludeNamedStatement("Control");
  816.                 
  817.             case 'butn':
  818.                 IncludeNamedStatement("Button");
  819.             
  820.             case 'popm':
  821.                 IncludeNamedStatement("PopUpMenu");
  822.             
  823.             case 'scbr':
  824.                 IncludeNamedStatement("ScrollBar");
  825.             
  826.             case 'lbox':
  827.                 IncludeNamedStatement("ListBox");
  828.             
  829.             case 'stxt':
  830.             case 'gpbx':
  831.                 IncludeNamedStatement("StaticText");
  832.             
  833.             case 'picv':
  834.                 IncludeNamedStatement("PicView");
  835.             
  836.             case 'edvw':
  837.             case 'Pwdv':
  838.                 IncludeNamedStatement("EditView");
  839.             
  840.             case 'Sedv':
  841.                 IncludeNamedStatement("ScrollingEditView");
  842.             
  843.             case 'Frmv':
  844.                 IncludeNamedStatement("FormView");
  845.             
  846.             default:
  847.                 HList()
  848.                 {
  849.                     StaticText("### unknown view class label: ");
  850.                     StaticText(fLabel);
  851.                 }
  852.         }
  853.